package com.zqu.service.impl;

import com.zqu.mapper.PManagerment.InsuranceMapper;
import com.zqu.pojo.Insurance;
import com.zqu.service.InsuranceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InsuranceServiceImpl implements InsuranceService {

    @Autowired(required = false)
    private InsuranceMapper insuranceMapper;

    @Override
    public Insurance selectInsuranceById(long id) {
        return insuranceMapper.selectTById(id);
    }

    @Override
    public List<Insurance> selectList(Insurance insurance) {
        return insuranceMapper.selectList(insurance);
    }

    @Override
    public boolean insertInsurance(Insurance insurance) {
        return insuranceMapper.insertT(insurance)>0;
    }

    @Override
    public boolean updateInsurance(Insurance insurance) {
        return insuranceMapper.updateT(insurance)>0;
    }

    @Override
    public boolean deleteInsurance(long id) {
        return insuranceMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteInsuranceByIds(String[] ids) {
        return insuranceMapper.deleteTByIds(ids)>0;
    }
}
